<wicket:extend>
	<div class="card subscription-management">
		<div class="card-body">
			<div wicket:id="content"></div>
		</div>
	</div>
	<wicket:fragment wicket:id="noSubscriptionFrag">
		<div class="alert alert-notice alert-light h6 mb-4">
			This installation does not have an active subscription and runs as community edition.
			To access <a href="https://onedev.io/pricing">enterprise features</a>, an active subscription is required
		</div>
		<div wicket:id="feedback"></div>
		<div class="d-flex align-items-center flex-wrap row-gap-2">
			<a href="https://onedev.io/pricing" class="btn btn-sm btn-outline-primary flex-shrink-0 mr-3">Order Subscription</a>
			<a wicket:id="installSubscriptionKey" class="btn btn-sm btn-outline-primary flex-shrink-0 mr-3">Install Subscription Key</a>
			<span wicket:id="requestTrialSubscription"></span>
		</div>
	</wicket:fragment>
	<wicket:fragment wicket:id="trialSubscriptionFrag">
		<div wicket:id="detail" class="alert alert-notice font-weight-bold mb-4">
			<h6 wicket:id="title"></h6>
			<ul class="mb-0">
				<li class="mb-2">
					Licensed To: <span wicket:id="licensee"></span>
				</li>
				<wicket:enclosure child="licenseGroup">
					<li class="mb-2">
						License Group: <span wicket:id="licenseGroup"></span> <span wicket:id="licenseGroupNotFound" class="ml-1 badge badge-sm badge-danger">not found</span>
					</li>
				</wicket:enclosure>
				<wicket:enclosure child="expirationDate">
					<li>
						Expiration Date: <span wicket:id="expirationDate"></span>
					</li>
				</wicket:enclosure>
			</ul>
			<div wicket:id="alert" class="font-weight-bolder mt-3"></div>
		</div>
		<div class="d-flex align-items-center flex-wrap row-gap-2">
			<a href="https://onedev.io/pricing" class="btn btn-sm btn-outline-primary flex-shrink-0 mr-3">Order Subscription</a>
			<a wicket:id="installSubscriptionKey" class="btn btn-sm btn-outline-primary flex-shrink-0 mr-3">Install Subscription Key</a>
			<a wicket:id="deactivateSubscription" class="btn btn-sm btn-outline-primary flex-shrink-0 mr-3">Deactivate Trial Subscription</a>
			<a href="mailto:support@onedev.io" class="btn btn-sm btn-outline-primary flex-shrink-0">Extend Trial Subscription</a>
		</div>
	</wicket:fragment>
	<wicket:fragment wicket:id="subscriptionFrag">
		<div wicket:id="detail" class="alert alert-notice font-weight-bold mb-4">
			<h6 wicket:id="title"></h6>
			<ul class="mb-0">
				<li class="mb-2">
					Licensed To: <span wicket:id="licensee"></span>
					<a href="mailto:support@onedev.io" class="alert-link ml-2">request to change</a>
				</li>
				<wicket:enclosure child="licenseGroup">
					<li class="mb-2">
						License Group: <span wicket:id="licenseGroup"></span> <span wicket:id="licenseGroupNotFound" class="ml-1 badge badge-sm badge-danger">not found</span>
						<div class="text-warning"><b>NOTE:</b> By using this license, you agree that all staff users shall be added to this group for user-month check</div>
					</li>
				</wicket:enclosure>
				<li class="mb-2">
					Remaining User Months: <span wicket:id="userMonths"></span>
					<a href="https://onedev.io/pricing" class="alert-link ml-2">order more</a>
				</li>
			</ul>
			<div wicket:id="expirationInfo" class="font-weight-bolder mt-3"></div>
			<div wicket:id="alert" class="font-weight-bolder mt-3"></div>
		</div>
		<div class="d-flex align-items-center flex-wrap row-gap-2">
			<a href="https://onedev.io/pricing" class="btn btn-sm btn-outline-primary mr-3 flex-shrink-0">Order More User Months</a>
			<a wicket:id="installSubscriptionKey" class="btn btn-sm btn-outline-primary mr-3 flex-shrink-0">Install Subscription Key</a>
			<a wicket:id="deactivateSubscription" class="btn btn-sm btn-outline-primary flex-shrink-0">Deactivate Subscription</a>
		</div>
	</wicket:fragment>
	<wicket:fragment wicket:id="firstTrialSubscriptionRequestFrag">
		<form class="form-inline" action="https://onedev.io/subscription-key" method="post">
			<input wicket:id="subscriptionKeyUUID" name="subscriptionKeyUUID" type="hidden">
			<button class="btn btn-sm btn-outline-primary flex-shrink-0" type="submit">Request Trial Subscription</button>
		</form>
	</wicket:fragment>
	<wicket:fragment wicket:id="moreTrialSubscriptionRequestFrag">
		<a href="mailto:support@onedev.io" class="btn btn-sm btn-outline-primary flex-shrink-0">Request Trial Subscription</a>
	</wicket:fragment>
</wicket:extend>